﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SDT.Site.ViewModels.ArticleListViewModel>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<div class="otheritem">
    <div class="title">
        <div class="o111"><%=ViewData["Title"]%></div>
        <div class="line"></div>
    </div>
    <div class="o2">
        <ul>
            <%var path = "/" + Model.ControllerName.ToLower() + "/" + Model.ActionList + "/" + (Model.Category != null ? "" + Model.Category.ID : "0");
              var pathDetails = "/" + Model.ControllerName.ToLower() + "/" + Model.ActionDetails;   %>
            <%foreach (var item in Model.Articles)
              { %>
            <li>
                <a href="<%=pathDetails %>/<%=item.ID %>/<%=Html.ToUrlFriendly(item.Title)%>"><%=Html.Encode(item.Title) %></a>
                <span class="date date-first">(<%=item.AddDate != null ? (item.AddDate.ToString("hh:mm") + "&nbsp;|&nbsp;" + item.AddDate.ToString("dd/MM/yyyy")) : string.Empty%>)</span>
            </li>
            <%} %>
        </ul>
    </div>
    <%if (Model.Articles.Count > 0)
      { %>
    <div class="next">
   	    <a href="<%=path %>">Xem tiếp&raquo;</a>
   	</div>
   	<%} %>
</div>
